package site.hackway.action;

import my.cache.CacheManager;
import my.mvc.Annotation;
import my.mvc.RequestContext;

import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

/**
 * Created by hackway on 2016/5/17.
 */
public class UserAction {

    @Annotation.GetMethod
    public void change_email(RequestContext ctx) {
        Map<String, Object> usermap = new HashMap<>();
        usermap.put("name","linshuhong");
        usermap.put("age",24);
        usermap.put("gender","male");
        try {
            CacheManager.put("1h","user","lsh");
            ctx.printMapToJson(usermap);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
